home *** CD-ROM | disk | FTP | other *** search
/ Winzipper / Winzipper_ISO.iso / nt4.0 server / OEMNSVDN.IN_ / oemnsvdn.inf
INI File  |  1996-07-12  |  16KB  |  437 lines

  1. [Identification]
  2.     OptionType = NetService
  3. [Options]
  4.     DNS
  5. [FileConstants]
  6. Manufacturer    = "Microsoft"
  7. ProductMajorVersion     = "4"
  8. ProductMinorVersion     = "0"
  9. ProductVersion  = $(ProductMajorVersion)"."$(ProductMinorVersion)
  10. ProductOpSupport     = 132 
  11. ProductDNSName          = "DNS"
  12. ProductDNSImagePath     = "%SystemRoot%\System32\dns.exe"
  13. ProductDNSSvcType       = "serviceauto"
  14. ProductService  = $(!NTN_ServiceBase)"\"$(ProductDNSName)
  15. ProductKeyName  = $(!NTN_SoftwareBase)"\"$(Manufacturer)"\"$(Product$(Option)Name)"\CurrentVersion"
  16. [GeneralConstants]
  17. UtilityInf       = "UTILITY.INF"
  18. subroutineinf    = "SUBROUTN.INF"
  19. Exit_Code        = 0
  20. BillboardVisible = 0
  21. from      = ""
  22. to        = ""
  23. ExitCodeOk     = 0
  24. ExitCodeCancel = 1
  25. ExitCodeFatal  = 2
  26. KeyNull         = ""
  27. MAXIMUM_ALLOWED   = 33554432
  28. SERVICE_NO_CHANGE = 4294967295
  29. RegistryErrorIndex = NO_ERROR
  30. KeyProduct      = ""
  31. KeyParameters   = ""
  32. TRUE            = 1
  33. FALSE           = 0
  34. NoTitle         = 0
  35. ExitState   = "Active"
  36. OldVersionExisted = $(FALSE)
  37. [date]
  38.     Now = {} ? $(!LIBHANDLE) GetSystemDate
  39. [Identify]
  40.     read-syms Identification
  41.     set Status     = STATUS_SUCCESSFUL
  42.     set Identifier = $(OptionType)
  43.     set Media      = #("Source Media Descriptions", 1, 1)
  44.     Return $(Status) $(Identifier) $(Media)
  45. [ReturnOptions]
  46.     set Status        = STATUS_FAILED
  47.     set OptionList     = {}
  48.     set OptionTextList = {}
  49.     set LanguageList = ^(LanguagesSupported, 1)
  50.     Ifcontains(i) $($0) in $(LanguageList)
  51.         goto returnoptions
  52.     else
  53.         set Status = STATUS_NOLANGUAGE
  54.         goto finish_ReturnOptions
  55.     endif
  56. returnoptions = +
  57.     set OptionList     = ^(Options, 1)
  58.     set OptionTextList = ^(OptionsText$($0), 1)
  59.     set Status         = STATUS_SUCCESSFUL
  60. finish_ReturnOptions = +
  61.     Return $(Status) $(OptionList) $(OptionTextList)
  62. [InstallOption]
  63.     set Option   = $($1)
  64.     set SrcDir   = $($2)
  65.     set AddCopy  = $($3)
  66.     set DoCopy   = $($4)
  67.     set DoConfig = $($5)
  68.     set LanguageList = ^(LanguagesSupported, 1)
  69.     Ifcontains(i) $($0) NOT-IN $(LanguageList)
  70.         Return STATUS_NOLANGUAGE
  71.     endif
  72.     Debug-Output "OEMNSVDN.INF: STF_CWDIR is: "$(!STF_CWDIR)
  73.     Debug-Output "OEMNSVDN.INF: STF_LANGUAGE is: "$(!STF_LANGUAGE)
  74.     set-subst LF = "\n"
  75.     read-syms GeneralConstants
  76.     read-syms FileConstants
  77.     read-syms DialogConstants$(!STF_LANGUAGE)
  78.     ifstr(i) $(!NTN_Origination) == "NCPA"
  79.         set Continue = $(OK)
  80.     endif
  81.     read-syms FileConstants$(!STF_LANGUAGE)
  82.     read-syms FileDependentDlg$(!STF_LANGUAGE)
  83.     detect date
  84.     set-title  $(FunctionTitle)
  85.     set to   = Begin
  86.     set from = Begin
  87.     set CommonStatus = STATUS_SUCCESSFUL
  88.     EndWait
  89. Begin = +
  90.     Ifstr(i) $(!NTN_InstallMode) == deinstall
  91.         set StartLabel = removeadapter
  92.     else-Ifstr(i) $(!NTN_InstallMode) == Update
  93.         set StartLabel = UpgradeSoftware
  94.     else-Ifstr(i) $(!NTN_InstallMode) == configure
  95.         set StartLabel = configureadapter
  96.         Ifstr(i) $(ProductKeyName) == $(!NTN_RegBase)
  97.             Debug-Output "Cannot configure the software."
  98.             Shell $(UtilityInf),RegistryErrorString,CANNOT_CONFIGURE_SOFTWARE
  99.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  100.                 Debug-Output "ShellCode error: cannot get an error string."
  101.                 goto ShellCodeError
  102.             endif
  103.             set Error = $($R0)
  104.             set from = end
  105.             set to = end
  106.             goto nonfatalinfo
  107.         endif
  108.     else-Ifstr(i) $(!NTN_InstallMode) == bind
  109.         set StartLabel = bindingadapter
  110.     else
  111.         set StartLabel = installadapter
  112.         set OEM_ABANDON_SOFTWARE = {}
  113.         set OEM_ABANDON_OPTIONS = {}
  114.     endif
  115.     set from = $(fatal)
  116.     set to = $(fatal)
  117.     goto $(StartLabel)
  118. installadapter = +
  119.     Shell $(UtilityInf), DoAskSource, $(!STF_CWDDIR), $(SrcDir) YES
  120.     Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  121.     Goto ShellCodeError
  122.        Else-Ifstr(i) $($R0) == STATUS_FAILED
  123.            Shell $(UtilityInf) RegistryErrorString "ASK_SOURCE_FAIL"
  124.            ifint $($ShellCode) != $(!SHELL_CODE_OK)
  125.                goto ShellCodeError
  126.            endif
  127.            set Error = $($R0)
  128.            Goto fatal
  129.        Else-Ifstr(i) $($R0) == STATUS_USERCANCEL
  130.            Goto successful
  131.     Endif
  132.     Set SrcDir = $($R1)
  133.     ifstr(i) $(!NTN_InstallMode) == "install"
  134.         Debug-Output "OEMNSVDN.INF: installadapter: installing [Install-Option]"
  135.         install "Install-Option"
  136.         ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
  137.            Shell $(UtilityInf) RegistryErrorString "UNABLE_COPY_FILE"
  138.            ifint $($ShellCode) != $(!SHELL_CODE_OK)
  139.                goto ShellCodeError
  140.            endif
  141.            set Error = $($R0)
  142.            goto fatal
  143.         endif
  144.     endif
  145.     set OEM_ABANDON_ON  = TRUE
  146.     StartWait
  147.     set ThisOption = DNS
  148.     Shell $(UtilityInf), AddSoftwareComponent, $(Manufacturer),+
  149.         $(Product$(ThisOption)Name),+
  150.         $(Product$(ThisOption)Name),+
  151.         $(Product$(ThisOption)DisplayName), $(STF_CONTEXTINFNAME),+
  152.         $(Product$(ThisOption)ImagePath),+
  153.         $(Product$(ThisOption)SvcType),+
  154.         "", {"Tcpip", "Afd", "NetBT", "RpcSs", "NTLmSsp"}, "", $(ProductDNSImagePath), 7, "", "", "", ""
  155.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  156.         Debug-Output "OEMNSVDN.INF: ShellCode error, add software component"
  157.         goto ShellCodeError
  158.     endif
  159.     set RegistryErrorIndex = $($R0)
  160.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  161.         EndWait
  162.         Debug-Output "OEMNSVDH.INF: Registry error: add software components"
  163.         CloseRegKey $($R1)
  164.         CloseRegKey $($R2)
  165.         CloseRegKey $($R3)
  166.         CloseRegKey $($R4)
  167.         CloseRegKey $($R5)
  168.         goto fatalregistry
  169.     endif
  170.     set DNSVersKeyHandle  = $($R1)
  171.     set NewValueList = {{SoftwareType,$(NoTitle),$(!REG_VT_SZ),"service"},+
  172.                        {MajorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMajorVersion)},+
  173.                        {MinorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMinorVersion)},+
  174.                        {Title,$(NoTitle),$(!REG_VT_SZ),$(Product$(ThisOption)Title)},+
  175.                        {Description,$(NoTitle),$(!REG_VT_SZ),$(Product$(ThisOption)Description)},+
  176.                        {ServiceName,$(NoTitle),$(!REG_VT_SZ),$(Product$(ThisOption)Name)},+
  177.                        {OperationsSupport,$(NoTitle),$(!REG_VT_DWORD),$(ProductOpSupport)}, +
  178.                        {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(Now),1)}}
  179.     Shell  $(UtilityInf), AddValueList, $(DNSVersKeyHandle), $(NewValueList)
  180.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  181.         Debug-Output "OEMNSVDN.INF: ShellCode error, add value list"
  182.         goto ShellCodeError
  183.     endif
  184.     set DNSNetRulesKeyHandle = $($R2)
  185.     set NewValueList = {{InfOption,$(NoTitle),$(!REG_VT_SZ),$(Option)}}
  186.     Shell  $(UtilityInf), AddValueList, $(DNSNetRulesKeyHandle), $(NewValueList)
  187.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  188.         Debug-Output "ShellCode error."
  189.         goto ShellCodeError
  190.     endif
  191.     set RegistryErrorIndex = $($R0)
  192.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  193.         EndWait
  194.         Debug-Output "OEMNXPTC.INF: Registry error: add value list."
  195.         CloseRegKey $(DHCPVersKeyHandle)
  196.         CloseRegKey $(DHCPParmKeyHandle)
  197.         goto fatalregistry
  198.     Endif
  199.     CloseRegKey $($R1)
  200.     CloseRegKey $($R2)
  201.     CloseRegKey $($R3)
  202.     CloseRegKey $($R4)
  203.     CloseRegKey $($R5)
  204.     ifstr(i) $(!STF_INSTALL_TYPE) != "SETUPBOOTED"
  205.         Shell "" AddDNS
  206.     endif
  207.     EndWait
  208.     goto successful
  209. configureadapter = +
  210.     goto end
  211. bindingadapter =+
  212.     goto end
  213. removeadapter = +
  214.     Shell $(UtilityInf), RemoveSoftwareComponent, $(Manufacturer), $(ProductDNSName)
  215.     ifstr(i) $(!STF_INSTALL_TYPE) != "SETUPBOOTED"
  216.         install "Remove-DNS-Icon"
  217.     endif
  218.     goto end
  219. UpgradeSoftware = +
  220.     OpenRegKey $(!REG_H_LOCAL) "" $(ProductService) $(MAXIMUM_ALLOWED) KeyProduct
  221.     ifstr $(KeyProduct) != $(KeyNull)
  222.         SetRegValue $(KeyProduct) {ImagePath,$(NoTitle),$(!REG_VT_EXPAND_SZ), $(ProductDNSImagePath)}
  223.         SetRegValue $(KeyProduct) {DependOnService,$(NoTitle),$(!REG_VT_MULTI_SZ), {"Tcpip", "Afd", "NetBT", "RpcSs", "NTLmSsp"}}
  224.         install "Install-Update"
  225.         ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
  226.                 goto fatal
  227.         endif
  228.         SetRegValue $(KeyProduct) {MajorVersion,$(NoTitle),$(!REG_VT_SZ),$(ProductMajorVersion)}
  229.         SetRegValue $(KeyProduct) {MinorVersion,$(NoTitle),$(!REG_VT_SZ),$(ProductMinorVersion)}
  230.         SetRegValue $(KeyProduct) {Description,$(NoTitle),$(!REG_VT_SZ),$(Product$(Option)Description)}
  231.         SetRegValue $(KeyProduct) {OperationsSupport,$(NoTitle),$(!REG_VT_DWORD),$(ProductOpSupport)}
  232.         OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_ServiceBase)"\EventLog\System\"$(ProductDNSName) $(MAXIMUM_ALLOWED) EventLog
  233.         ifstr $(EventLog) != $(KeyNull)
  234.             SetRegValue $(EventLog) {EventMessageFile,$(NoTitle),$(!REG_VT_EXPAND_SZ), $(ProductDNSImagePath)}
  235.             CloseRegKey $(EventLog)
  236.         endif
  237.         install "Remove-DNS-Icon"
  238.         install "Install-DNS-Icon"
  239.         CloseRegKey $(KeyProduct)
  240.     endif
  241.     goto end
  242. successful = +
  243.     goto end
  244. infomsg =+
  245.    read-syms InfoDlg
  246.    ui start "Warning"
  247.    set CommonStatus = STATUS_USERCANCEL
  248.    goto end
  249. warning = +
  250.     Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "WARNING", $(Error)
  251.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  252.         goto ShellCodeError
  253.     endif
  254.     ifstr(i) $($R1) == "OK"
  255.         goto $(to)
  256.     else-ifstr(i) $($R1) == "CANCEL"
  257.         goto $(from)
  258.     else
  259.         goto "end"
  260.     endif
  261. nonfatalinfo = +
  262.     Set CommonStatus = STATUS_USERCANCEL
  263.     Set Severity = STATUS
  264.     goto nonfatalmsg
  265. nonfatal = +
  266.     Set Severity = NONFATAL
  267.     goto nonfatalmsg
  268. nonfatalmsg = +
  269.     ifstr(i) $(Error) == ""
  270.         Set Severity = NONFATAL
  271.         Shell $(UtilityInf) RegistryErrorString "SETUP_FAIL"
  272.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  273.             goto ShellCodeError
  274.         endif
  275.         set Error = $($R0)
  276.     endif
  277.     Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), $(Severity), $(Error)
  278.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  279.         goto ShellCodeError
  280.     endif
  281.     ifstr(i) $($R1) == "OK"
  282.         goto $(from)
  283.     else
  284.         goto "end"
  285.     endif
  286. fatalregistry = +
  287.     Shell $(UtilityInf) RegistryErrorString $(RegistryErrorIndex)
  288.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  289.         goto ShellCodeError
  290.     endif
  291.     set Error = $($R0)
  292.     goto fatal
  293. fatal = +
  294.     ifstr(i) $(Error) == ""
  295.         Shell $(UtilityInf) RegistryErrorString "SETUP_FAIL"
  296.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  297.             goto ShellCodeError
  298.         endif
  299.         set Error = $($R0)
  300.     endif
  301.     Ifint $(BillboardVisible) != 0
  302.         Shell "subroutn.inf" PopBillboard
  303.         Set BillboardVisible = 0
  304.     Endif
  305.     Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "FATAL", $(Error)
  306.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  307.         goto ShellCodeError
  308.     endif
  309.    goto setfailed
  310. ShellCodeError = +
  311.     set DlgType      = "MessageBox"
  312.     set STF_MB_TITLE = $(ShellCodeErrorTitle)
  313.     set STF_MB_TEXT  = $(ShellCodeErrorText)
  314.     set STF_MB_TYPE  = 1
  315.     set STF_MB_ICON  = 3
  316.     set STF_MB_DEF   = 1
  317.     ui start "Error Message"
  318.     goto setfailed
  319. setfailed = +
  320.     set CommonStatus = STATUS_FAILED
  321.     ifstr(i) $(OEM_ABANDON_ON) == TRUE
  322.         set OEM_ABANDON_ON = FALSE
  323.         goto removeadapter
  324.     endif
  325.     goto end
  326. end = +
  327.     goto term
  328. term = +
  329.     Return $(CommonStatus)
  330. [GetFilesSize]
  331.     set FileSizeList = ^(Files-DNS,3)
  332.     set TotalSize = 0
  333.     ForListDo $(FileSizeList)
  334.         Split-String $($) "=" SplitString
  335.         set Size = *($(SplitString),3)
  336.         set-add TotalSize = $(TotalSize) $(Size)
  337.     EndForListDo
  338.     set-div SizeInK = $(TotalSize) 1024
  339.     return $(SizeInK)
  340. [Install-Option]
  341.     set STF_VITAL = ""
  342.     ifstr(i) $(AddCopy) == "YES"
  343.         CreateDir $(!STF_WINDOWSSYSPATH)\DNS
  344.         CreateDir $(!STF_WINDOWSSYSPATH)\DNS\SAMPLES
  345.         AddSectionFilesToCopyList Files-DNS $(SrcDir) $(!STF_WINDOWSSYSPATH)
  346.         AddSectionFilesToCopyList Files-DNS-SAMPLE $(SrcDir) $(!STF_WINDOWSSYSPATH)\dns\samples
  347.         AddSectionFilesToCopyList Files-DNS-SAMPLE1 $(SrcDir) $(!STF_WINDOWSSYSPATH)\dns
  348.         AddSectionFilesToCopyList Files-HELP $(SrcDir) $(!STF_WINDOWSPATH)\help
  349.     endif
  350.     ifstr(i) $(DoCopy) == "YES"
  351.        set !STF_NCPA_FLUSH_COPYLIST = TRUE
  352.        CopyFilesInCopyList
  353.     else
  354.         LibraryProcedure STATUS,$(!NCPA_HANDLE), CopySingleFile $(!STF_HWND) $(SrcDir)\DNSADMIN.EXE $(!STF_WINDOWSSYSPATH)\DNSADMIN.EXE
  355.     endif
  356.     ifstr(i) $(DoConfig) == "YES"
  357.     endif
  358.     Exit
  359. [Install-Update]
  360.    set STF_VITAL        = ""
  361.    set STF_OVERWRITE    = "VERIFYSOURCEOLDER"
  362.    AddSectionFilesToCopyList Files-DNS $(SrcDir) $(!STF_WINDOWSSYSPATH)
  363.    AddSectionFilesToCopyList Files-DNS-SAMPLE $(SrcDir) $(!STF_WINDOWSSYSPATH)\dns\samples
  364.    AddSectionFilesToCopyList Files-HELP $(SrcDir) $(!STF_WINDOWSPATH)\help
  365.    LibraryProcedure STATUS,$(!NCPA_HANDLE), CopySingleFile $(!STF_HWND) $(SrcDir)\DNSADMIN.EXE $(!STF_WINDOWSSYSPATH)\DNSADMIN.EXE
  366.    Exit
  367. [Install-DNS-Icon]
  368.     CreateCommonProgManGroup $(GroupName), ""
  369.     RemoveCommonProgManItem $(GroupName), $(IconName)
  370.     CreateCommonProgManItem $(GroupName), $(IconName), dnsadmin.exe, dnsadmin.exe, ""
  371.     ShowCommonProgManGroup $(GroupName), 6
  372.     exit
  373. [Remove-DNS-Icon]
  374.     RemoveCommonProgManItem $(OldGroupName), $(IconName)
  375.     RemoveCommonProgManItem $(GroupName), $(IconName)
  376.     exit
  377. [AddDNS]
  378.     read-syms FileConstants$(!STF_LANGUAGE)
  379.     read-syms GeneralConstants
  380.     OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_SoftwareBase)"\Microsoft\DNS" $(MAXIMUM_ALLOWED) ProductKey
  381.     ifstr(i) $(ProductKey) != ""
  382.         install "Install-DNS-Icon"
  383.         CloseRegKey $(ProductKey)
  384.     endif
  385.     return
  386. [Source Media Descriptions]
  387.     1 = "Windows NT Server CD-ROM", TAGFILE = cdrom_s.40
  388. [Signature]
  389.     FileType = MICROSOFT_FILE
  390. [GetSignature]
  391.     read-syms Signature
  392.     return $(FileType)
  393. [ProductType]
  394. STF_PRODUCT  = LanmanNT
  395. STF_PLATFORM = I386
  396. [Files-Inf]
  397. 2,    oemsetup.inf,     SIZE=1000,    RENAME=$(!UG_Filename)
  398. [Files-DNS-SAMPLE1]
  399. 1, CACHE.DNS, SIZE=999 OVERWRITE=NEVER, NODELETESOURCE
  400. [Files-DNS-SAMPLE]
  401. 1, 192.DNS, SIZE=999, NODELETESOURCE
  402. 1, BOOT, SIZE=999, NODELETESOURCE
  403. 1, CACHE.DNS, SIZE=999, NODELETESOURCE
  404. 1, PLACE.DNS, SIZE=999, NODELETESOURCE
  405. [Files-DNS]
  406. 1, DNS.EXE, SIZE=999
  407. 1, DNSADMIN.EXE, SIZE=999
  408. [Files-HELP]
  409. 1, DNSADMIN.CNT, SIZE=2395
  410. 1, DNSADMIN.HLP, SIZE=73944
  411. [LanguagesSupported]
  412.     ENG
  413. [DialogConstantsENG]
  414. Help        = "&Help"
  415. Exit        = "Cancel"
  416. OK          = "OK"
  417. HelpContext = ""
  418. Continue    = "Continue"
  419. Cancel      = "Cancel"
  420. [FileDependentDlgENG]
  421. ProCaption   = "Windows NT Setup"
  422. ProCancel    = "Cancel"
  423. ProCancelMsg = "Windows NT Networking is not correctly installed.  "+
  424.                "Are you sure you want to cancel copying files?"
  425. ProCancelCap = "Network Setup Message"
  426. ProText1     = "Copying:"
  427. ProText2     = "To:"
  428. [FileConstantsENG]
  429. ProductDNSDisplayName  = "Microsoft DNS Server"
  430. ProductDNSTitle        = "Microsoft DNS Server"
  431. ProductDNSDescription  = "The Domain Name System maps DNS domain names to IP addresses."
  432. OldGroupName = "Network Administration"
  433. GroupName = "Administrative Tools"
  434. IconName  = "DNS Manager"
  435. [OptionsTextENG]
  436.         DNS = "Microsoft DNS Server"
  437.